﻿@model System.Web.Mvc.HandleErrorInfo
@{
    Layout = "_ErrorLayout.cshtml";
    ViewBag.Title = "Security Error";

    object value;
    ViewData.TryGetValue("Exception", out value);
    Exception exception = value as Exception;    
}
<div class="alert alert-danger fade in" role="alert">
    <span class="glyphicon glyphicon-exclamation-sign"></span>&nbsp;<span>@(exception?.Message)</span>
</div>
@if (Model != null && HttpContext.Current.IsDebuggingEnabled)
{
    <div>
        <p>
            <b>Exception:</b> @Model.Exception.Message<br />
            <b>Controller:</b> @Model.ControllerName<br />
            <b>Action:</b> @Model.ActionName
        </p>
        <div style="overflow:scroll">
            <pre>
                @Model.Exception.StackTrace
            </pre>
        </div>
    </div>
}
